extension Object_ on Object {
  String toYuan({bool isFen = true}) {
    final result = ((double.tryParse(this.toString()) ?? 0) / (isFen ? 100 : 1)).toStringAsFixed(2);
    if (result.endsWith("00")) {
      return result.split(".").first;
    }
    if (result.endsWith("0")) {
      return result.substring(0, result.length - 2);
    }
    return "0";
  }
}
